<el-dialog title="新增入库" v-model="addFormDialog">
  <el-form  ref="addForm" :label-width="dialogLabelWidth" :model="addForm" :rules="addRules">
    <el-row>
      <el-col :span="11">
        <el-form-item label="名称" prop="name">
          <el-select v-model="addForm.name" placeholder="请选择用品名称" @change="nameChange">
            <el-option v-for="(value,key) in names" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="11">
        <el-form-item label="规格" prop="specification">
          <el-select v-model="addForm.specification" placeholder="请选择物品规格" @change="specChange">
            <el-option v-for="(value,key) in specifications" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
    	<el-col :span="11">
        <el-form-item label="单位" prop="unit">
          <el-select v-model="addForm.unit" placeholder="请选择物品单位">
            <el-option v-for="(value,key) in units" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="11">
        <el-form-item label="单价" prop="price">
          <el-input v-model.number="addForm.price" placeholder="请填写物品单价" :maxlength="8"></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="11">
        <el-form-item label="数量" prop="num">
          <el-input-number v-model="addForm.num" :min="1" :max="999"></el-input-number>
        </el-form-item>
      </el-col>
      <el-col :span="11">
        <el-form-item label="采购入库时间" prop="order_time">
          <el-date-picker v-model="addForm.order_time" type="datetime" placeholder="选择采购入库时间" 
           style="max-width:200px;" :editable="false" @change="orderTime" :picker-options="pickerOption1">
          </el-date-picker>
        </el-form-item>
      </el-col>
    </el-row>
 
    <el-row>
      <el-col :span="22">
        <el-form-item label="备注" prop="remark">
          <el-input type="textarea" :rows="4" v-model="addForm.remark" placeholder="请填写活动备注"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>

  <div slot="footer" class="dialog-footer">
   <include file="Common:_add" />
  </div>

</el-dialog>
